package com.bgs.medicalmerchantboot.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.bgs.medicalmerchantboot.entity.merchantMessage;
import com.bgs.medicalmerchantboot.mapper.testMapper;
import com.bgs.microservices.service.common.response.CommonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName controller
 * @Description TODO
 * @Author WangShunQi
 * @Date 2023/11/14 10:28
 **/
@RestController
@RequestMapping("/test")
@Slf4j
@RefreshScope
public class controller {
    @Autowired
    testMapper testMapper;

    @GetMapping("/findAll")
    public CommonResult findAll(){
        System.out.println("进来了");
        QueryWrapper<merchantMessage> deptQueryWrapper = new QueryWrapper<>();
        List<merchantMessage> deptList = testMapper.selectList(deptQueryWrapper);
        System.out.println(deptList);
        return CommonResult.ok(deptList);
    }
}
